using System;
using System.Collections;

namespace Axe.Geometry
{
    /// <summary>
    /// Summary description for Sphere.
    /// </summary>
    public class Sphere
    {
        private Vector3 mCenter = new Vector3();
        private double mRadius = 0;

        /// <summary>
        /// Gets or sets the center of the sphere
        /// </summary>
        /// <value>The center.</value>
        public Vector3 Center
        {
            get { return mCenter; }
            set { mCenter = value; }
        }


        /// <summary>
        /// Gets or sets the radius of the sphere
        /// </summary>
        /// <value>The radius.</value>
        public double Radius
        {
            get { return mRadius; }
            set { mRadius = value; }
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="Sphere"/> class.
        /// </summary>
        /// <mParam name="centerX">The center X coordinate.</mParam>
        /// <mParam name="centerY">The center Y coordinate.</mParam>
        /// <mParam name="centerZ">The center Z coordinate.</mParam>
        /// <mParam name="radius">The radius of the sphere.</mParam>
        public Sphere(double centerX,double centerY,double centerZ,double radius)
        {
            Center = new Vector3(centerX,centerY,centerZ);
            Radius = radius;
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="Sphere"/> class.
        /// </summary>
        /// <mParam name="center">The center.</mParam>
        /// <mParam name="radius">The radius.</mParam>
        public Sphere(Vector3 center,double radius)
        {
            Center = center;
            Radius = radius;
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="Sphere"/> class.
        /// </summary>
        /// <mParam name="radius">The radius.</mParam>
        public Sphere(double radius)
        {
            Radius = radius;
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="Sphere"/> class.
        /// </summary>
        public Sphere()
        {

        }

        public static double GetVolume(double radius)
        {
            return (4.0 * Math.PI * radius * radius * radius) / 3.0;
        }
    }
}
